package com.fan.controller;

import com.fan.service.VideoService;
import com.fan.utils.CommonResults;
import com.sixth.until.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @program: self-tui-education
 * @description:
 * @author: 老范
 * @create: 2022-05-09 17:54
 **/

@Api(tags = "视频模块")
@RestController
@RequestMapping("/order/video")
public class VideoController {
    @Autowired
    private VideoService videoService;
    @ApiOperation(value = "查看视频链接")
    @PostMapping("/queryAllVideoByCourseId/{id}")
    public CommonResults queryAllVideoByCourseId(@PathVariable("id") @RequestBody String id){
        CommonResults commonResult = videoService.queryAllVideoByCourseId(id);
        return new CommonResults(2000,"查询成功",commonResult);
    }
}
